
#include "YCASimpleDialogAddin.h"
#include "CATCreateWorkshop.h"
#include "CATCommandHeader.h"
MacDeclareHeader(YCASimpleDialogCmdHeader);  
CATImplementClass(YCASimpleDialogAddin,
                  Implementation,
                  CATBaseUnknown,
                  CATnull );
 

//-----------------------------------------------------------------------------
// YCASimpleDialogAddin : constructor
//-----------------------------------------------------------------------------
YCASimpleDialogAddin::YCASimpleDialogAddin():
    CATBaseUnknown()
{
}

//-----------------------------------------------------------------------------
// YCASimpleDialogAddin : destructor
//-----------------------------------------------------------------------------
YCASimpleDialogAddin::~YCASimpleDialogAddin()
{
}
 
// Link the implementation to its interface
// ---------------------------------------



//TIE or TIEchain definitions
#include "TIE_CATIAfrGeneralWksAddin.h"
TIE_CATIAfrGeneralWksAddin(YCASimpleDialogAddin);


//Methods implementation
//-------------------------------------------------------------------------
void YCASimpleDialogAddin::CreateCommands()
{
	new YCASimpleDialogCmdHeader( "YCASimpleDialogHdr", "YCASimpleDialogObjects", "YCASimpleDialogCmd", (void *)NULL);
}
//-------------------------------------------------------------------------
CATCmdContainer* YCASimpleDialogAddin::CreateToolbars()
{
	//new container
	NewAccess( CATCmdContainer, pYCASimpleDialogTlb,YCASimpleDialogTlb);

	//First
	NewAccess(CATCmdStarter,pSimpleDialogCmd,SimpleDialogStr);
	SetAccessCommand (pSimpleDialogCmd,"YCASimpleDialogHdr");
	SetAccessChild(pYCASimpleDialogTlb,pSimpleDialogCmd);


	//third
	{
		//new container
		NewAccess( CATCmdContainer, pYCASimpleDialogTlb2,YCASimpleDialogTlb2);
		SetAccessNext(pSimpleDialogCmd,pYCASimpleDialogTlb2);

		//First
		NewAccess(CATCmdStarter,pSimpleDialogCmd3,SimpleDialogStr3);
		SetAccessCommand (pSimpleDialogCmd3,"YCASimpleDialogHdr");
		SetAccessChild(pYCASimpleDialogTlb2,pSimpleDialogCmd3);

		//Second
		NewAccess(CATCmdStarter,pSimpleDialog4Cmd,SimpleDialog2Str);
		SetAccessCommand (pSimpleDialog4Cmd,"YCASimpleDialogHdr");
		SetAccessNext(pSimpleDialogCmd3,pSimpleDialog4Cmd);

		//Second
		NewAccess(CATCmdStarter,pSimpleDialog2Cmd,SimpleDialog2Str);
		SetAccessCommand (pSimpleDialog2Cmd,"YCASimpleDialogHdr");
		SetAccessNext(pSimpleDialog4Cmd,pSimpleDialog2Cmd);
	}
	//put toolbar in catia
	AddToolbarView( pYCASimpleDialogTlb  , 1 , Right );
	return pYCASimpleDialogTlb;
}
//-------------------------------------------------------------------------
